Table View

Functions to manage camera and game view.

Functions

FadeIn([speed]) Do a full-screen fade-in from black.
FadeOut([speed]) Do a full-screen fade-to-black.
SetCineBars([height], [speed]) Move black cinematic bars in from the top and bottom of the game window.
SetFOV(angle) Set field of view.
GetFOV() Get field of view.
GetCameraType() Shows the mode of the game camera.
GetCameraPosition() Gets current camera position.
GetCameraTarget() Gets current camera target.
GetCameraRoom() Gets current room where camera is positioned.
SetPostProcessMode(effect) Sets the post-process effect mode, like negative or monochrome.
SetPostProcessStrength([strength]) Sets the post-process effect strength.
SetPostProcessTint(tint) Sets the post-process tint.
PlayVideo(fileName, [background], [silent], [loop]) Play a video file.
StopVideo() Stop the currently playing video.
GetVideoPosition() Gets the currently playing video position.
SetVideoPosition(position) Sets the currently playing video position.
GetVideoDominantColor() Gets the dominant color for the current video frame.
IsVideoPlaying([name]) Checks if video is currently playing.
PlayFlyby(seqID) Play a flyby sequence.
GetFlybyPosition(seqID, progress, [loop]) Get a flyby sequence's position at a specified progress point in percent.
GetFlybyRotation(seqID, progress, [loop]) Get a flyby sequence's rotation at a specified progress point in percent.
ResetObjCamera() Reset object camera back to Lara and deactivate object camera.
FlashScreen([color], [speed]) Flash screen.
GetAspectRatio() Get the display resolution's aspect ratio.


Functions

FadeIn([speed])
Do a full-screen fade-in from black.

Parameters:

  • speed float Speed in units per second. A value of 1 will make the fade take one second. Default: 1.
FadeOut([speed])
Do a full-screen fade-to-black. The screen will remain black until a call to FadeIn.

Parameters:

  • speed float Speed in units per second. A value of 1 will make the fade take one second. Default: 1.
SetCineBars([height], [speed])
Move black cinematic bars in from the top and bottom of the game window.

Parameters:

  • height float Percentage of the screen to be covered. Default: 30.
  • speed float Coverage percent per second. Default: 30.
SetFOV(angle)
Set field of view.

Parameters:

  • angle float Angle in degrees (clamped to [10, 170]).
GetFOV()
Get field of view.

Returns:

    float Current FOV angle in degrees.
GetCameraType()
Shows the mode of the game camera.

Returns:

    CameraType Value used by the game camera.

Usage:

    LevelFuncs.OnLoop = function()
    	if (View.GetCameraType() == CameraType.COMBAT) then
    		--Do your Actions here.
    	end
    end
GetCameraPosition()
Gets current camera position.

Returns:

    Vec3 Current camera position.
GetCameraTarget()
Gets current camera target.

Returns:

    Vec3 Current camera target.
GetCameraRoom()
Gets current room where camera is positioned.

Returns:

    Room Current room of the camera.
SetPostProcessMode(effect)
Sets the post-process effect mode, like negative or monochrome.

Parameters:

SetPostProcessStrength([strength])
Sets the post-process effect strength.

Parameters:

  • strength float How strong the effect is. Default: 1.
SetPostProcessTint(tint)
Sets the post-process tint.

Parameters:

  • tint Color value to use.
PlayVideo(fileName, [background], [silent], [loop])
Play a video file. File should be placed in the FMV folder.

Parameters:

  • fileName string Video file name. Can be provided without extension, if type is mp4, mkv, mov or avi.
  • background bool Play video in the background mode. In such case, video won't play in fullscreen, but must be shown using special animated texture type in Tomb Editor, or using View.DisplaySprite. Default: false.
  • silent bool Play video without sound. Default: false.
  • loop bool Play video in a loop. Default: false.
StopVideo()
Stop the currently playing video. Only possible if video is playing in the background mode.
GetVideoPosition()
Gets the currently playing video position.

Returns:

    Time Current video position.
SetVideoPosition(position)
Sets the currently playing video position.

Parameters:

  • position Time New video position.
GetVideoDominantColor()
Gets the dominant color for the current video frame. If no video is playing, returns black.

Returns:

    Color Dominant video color.
IsVideoPlaying([name])
Checks if video is currently playing.

Parameters:

  • name string Video file name. If provided, checks if the currently playing video file name is the same as the provided one. Optional.

Returns:

    bool True if video is currently playing.
PlayFlyby(seqID)
Play a flyby sequence.

Parameters:

  • seqID int Flyby sequence ID.
GetFlybyPosition(seqID, progress, [loop])
Get a flyby sequence's position at a specified progress point in percent.

Parameters:

  • seqID int Flyby sequence ID.
  • progress float Progress point in percent. Clamped to [0, 100].
  • loop bool Smooth the position near start and end points, as if the sequence is looped. Optional.

Returns:

    Vec3 Position at the given progress point.
GetFlybyRotation(seqID, progress, [loop])
Get a flyby sequence's rotation at a specified progress point in percent.

Parameters:

  • seqID int Flyby sequence ID.
  • progress float Progress point in percent. Clamped to [0, 100].
  • loop bool Smooth the position near start and end points, as if the sequence is looped. Optional.

Returns:

    Rotation Rotation at the given progress point.
ResetObjCamera()
Reset object camera back to Lara and deactivate object camera.
FlashScreen([color], [speed])
Flash screen.

Parameters:

  • color Color Color. Default: Color(255, 255, 255).
  • speed float Speed in units per second. Value of 1 will make flash take one second. Clamped to [0.005, 1.0]. Default: 1.
GetAspectRatio()
Get the display resolution's aspect ratio.

Returns:

    float Display resolution's aspect ratio.
generated by TEN-LDoc (a fork of LDoc 1.4.6)